home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 February: Tool Chest / Dev.CD Feb 94.toast / New System Software Extensions / ColorSync™ 1.0.3 / Interfaces / RIncludes / CMApplication.r
Encoding:
Text File  |  1993-07-19  |  2.8 KB  |  130 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        CMApplication.r
  3.  
  4.     Contains:    Header for Color Matching aware applications
  5.  
  6.     Written by:    Tom Mohr
  7.  
  8.     Copyright:    © 1993 by Apple Computer, Inc., all rights reserved.
  9.  
  10.  
  11. */
  12.  
  13. #ifndef __CMAPPLICATION.R__
  14. #define __CMAPPLICATION.R__
  15.  
  16. #ifndef __SYSTYPES.R__
  17. #include "SysTypes.r"
  18. #endif
  19.  
  20. /* Number of values in response.counts */
  21. #define    onePlusLastResponse        9
  22.  
  23. /* Profile Header version */
  24. #define    kCMApplProfileVersion    0x0100
  25.  
  26.  
  27. type 'prof'
  28. {
  29.     startOfProfile:
  30.  
  31.     header:
  32.         unsigned longint = (endOfProfile - startOfProfile) >> 3;    /* size */
  33.         literal longint;                                            /* CMMType */
  34.         hex longint = kCMApplProfileVersion;                        /* applProfileVersion */
  35.         literal longint     rgbData            = 'RGB ',                /* dataType */
  36.                             cmykData        = 'CMYK',
  37.                             grayData        = 'GRAY',
  38.                             xyzData            = 'XYZ ';
  39.  
  40.         literal longint        monitorDevice    = 'mntr',                /* deviceType */
  41.                             scannerDevice    = 'scnr',
  42.                             printerDevice    = 'prtr',
  43.                             qdSystemDevice    = 'sys ',
  44.                             qdGDevice        = 'gdev';
  45.         literal longint;                                            /* deviceManufacturer */
  46.         hex longint;                                                /* deviceModel */
  47.         array[2]                                                    /* deviceAttributes */
  48.         {
  49.             hex longint;
  50.         };
  51.  
  52.         unsigned longint = (profileName - startOfProfile) >> 3;        /* profileNameOffset */
  53.         unsigned longint = (endOfProfile - startOfProfile) >> 3;    /* customDataOffset */
  54.  
  55.         unsigned hex longint;                                        /* flags */
  56.         unsigned hex longint;                                        /* options */
  57.  
  58.         wide array[3]                                                /* white (XYZColor) */
  59.         {
  60.             unsigned hex integer;
  61.         };
  62.         wide array[3]                                                /* black (XYZColor) */
  63.         {
  64.             unsigned hex integer;
  65.         };
  66.  
  67.     profile:        
  68.         array[6]
  69.         {                                                            /* RGBCMY (XYZColor) */
  70.             wide array[3]
  71.             {
  72.                 unsigned hex integer;
  73.             };
  74.         };
  75.  
  76.     response:
  77.         wide array[onePlusLastResponse]                                /* response.counts */
  78.         {
  79.             responseCounts:        
  80.             unsigned integer;
  81.         };
  82.                                                                     /* response.data */
  83.  
  84.         wide array[$$Word(responseCounts[1])]                        /* grayResponse */
  85.         {
  86.             unsigned integer;
  87.         };
  88.         wide array[$$Word(responseCounts[2])]                        /* redResponse */
  89.         {
  90.             unsigned integer;
  91.         };
  92.         wide array[$$Word(responseCounts[3])]                        /* greenResponse */
  93.         {
  94.             unsigned integer;
  95.         };
  96.         wide array[$$Word(responseCounts[4])]                        /* blueResponse */
  97.         {
  98.             unsigned integer;
  99.         };
  100.         wide array[$$Word(responseCounts[5])]                        /* cyanResponse */
  101.         {
  102.             unsigned integer;
  103.         };
  104.         wide array[$$Word(responseCounts[6])]                        /* magentaResponse */
  105.         {
  106.             unsigned integer;
  107.         };
  108.         wide array[$$Word(responseCounts[7])]                        /* yellowResponse */
  109.         {
  110.             unsigned integer;
  111.         };
  112.         wide array[$$Word(responseCounts[8])]                        /* ucrResponse */
  113.         {
  114.             unsigned integer;
  115.         };
  116.         wide array[$$Word(responseCounts[9])]                        /* bgResponse */
  117.         {
  118.             unsigned integer;
  119.         };        
  120.         
  121.     profileName:
  122.         integer Script;                                                /* theScript */
  123.         pstring;                                                    /* theString (Str63) */
  124.         
  125.          align word;                                                    /* pad byte if name size is odd */
  126.         
  127.     endOfProfile:
  128. };
  129.  
  130. #endif